<script type="text/javascript">
        $('#fileUpload').html("");
        $("#fileUpload").animate({opacity: 100}, 1500 );
</script>
<?php if(!$errorImage):?>
    <script type="text/javascript">
        $('#fileUpload').html("<div class='msn_ready' >File uploaded </div>");
        $("#fileUpload").animate({opacity: 0}, 3000);
    </script>

<?php $idSeller = sfContext::getInstance()->getUser()->getAttribute('id_user_seller'); ?>
<?php $appYml = sfConfig::get('app_upload_images_product'); ?>
    
<div id="item_<?php echo $idContent;?>" class='contentPicture'>
  <div id="deleteHomeImage">
    <?php echo jq_link_to_remote('Eliminar imagen', array(
        'update'   =>  'item_'.$idContent,
        'url'      =>  'products/deleteImageGallery?id='.$idContent,
        'script'   => true,
        'confirm'  => __('Are you sure you want to delete the selected data?'),
        'before'   => "$('#item_".$idContent."').html('<div align=center><br />".image_tag('preload.gif','title="" alt=""')."</div>');",
        'complete' => "$('#item_".$idContent."').remove();"
    ),'class="delete"');
    ?>
  </div>
  <div id="elemento_<?php echo $idContent;?>" class="imagePoster">
    <?php if(is_file(sfConfig::get('sf_upload_dir').'/products/'.$idSeller.'/gallery/'.$appYml['size_3']['pref_3'].'_'.$item->getImage())):?>
      <?php echo image_tag('/uploads/products/'.$idSeller.'/gallery/'.$appYml['size_3']['pref_3'].'_'.$item->getImage(),' alt="" title="" class="  ')  ?>
    <?php else:?>
      <?php echo image_tag('no_image_available.jpg','width="200px" height="180px" ')  ?>
    <?php endif;?>
  </div>
  
  
</div>
<?php else: ?>
    <script type="text/javascript">
        $('#fileUpload').html("The size of the image is too big, it can't be more than <?php echo sfConfig::get('app_image_size_max')?> Kb. Try another image");
        $("#fileUpload").animate({opacity: 0}, 5000);
    </script>
<?php endif;?>

